<template>
  <div class="data-card">
    <div class="data-card-content" :style="{backgroundColor: obj.backColor }">
      <div class="data-img">
        <img :src="obj.img"/>
      </div>
      <div class="data-text">
        <p>{{ obj.desc }}</p>
        <p>{{ obj.data }}</p>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "DataCard",
    props: {
      obj: {
        Object,
        default: () => {}
      }
    }
  }
</script>

<style lang="less" scoped>
  .data-card {
    width: 100%;
    height: 170px;
    padding: 0 20px 20px 20px;
    font-weight: 800;
    .data-card-content {
      width: 100%;
      height: 100%;
      display: flex;
      border-radius: 5px;
      justify-content: space-between;
      .data-img {
        width: 100px;
        height: 100%;
        line-height: 180px;
        text-align: center;
      }
      .data-text {
        width: 170px;
        padding: 45px 0;
        text-align: left;
        p:nth-child(1) {
          font-size: 12px;
          color: #929696;
        }
        p:nth-child(2) {
          font-size: 24px;
          font-weight: bold;
          padding: 10px 0;
        }
      }
    }
  }
</style>
